package com.imufe.chemicalenterprisedangerwarning.entity.query;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * @author BaiBan
 * @since 2022/10/8
 */
@ApiModel("用户请求")
@Data
public class UserQuery {

    @ApiModelProperty("编号")
    @Null(message = "创建时用户编号不能填", groups = CreateGroup.class)
    @NotNull(message = "修改时用户编号必须填", groups = UpdateGroup.class)
    private Long id;

    @ApiModelProperty("账号")
    private String username;

    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("姓名")
    private String nickName;

    @ApiModelProperty("性别; 0-男; 1-女;")
    private Boolean sex;

    @ApiModelProperty("年龄")
    private Byte age;
}
